/*
 * Copyright @ 苏州瑞云信息技术有限公司 All rights reserved.
 */
package work.hutool.util;

import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.io.FileUtil;
import lombok.var;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author Sakura Shen
 * @description
 * @date 2021/9/8
 */
public class FileUtilTest {

    public static void main(String[] args) {

        // 创建文件
        String path = "E:\\aaa.txt";
        File newFile = FileUtil.touch(path);
//        try (var fileOutputStream = new FileOutputStream(newFile)) {
//            var bytes = new byte[1024];
//            var length = inputStream.read(bytes);
//            while (length > 0) {
//                fileOutputStream.write(bytes, 0, length);
//                length = inputStream.read(bytes);
//            }
//        } catch (IOException e) {
//            FileUtil.del(newFile);
//        }

    }
}
